

File file = new File("/Users/chipingyung/IdeaProjects/xz/eoms-groupsupplies/src/main/resources/绿色通道导入模板.xlsx");
        FileInputStream input = new FileInputStream(file);
        // 模拟 MultipartFile
        MockMultipartFile multipartFile = new MockMultipartFile(
                "file",
                file.getName(),
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                input
        );
        ResultActions resultActions = mockMvc.perform(MockMvcRequestBuilders.multipart("/api/egm/warehouse/importGreenData")
                .file(multipartFile));
        // 响应数据设置编码
        resultActions.andReturn().getResponse().setCharacterEncoding("UTF-8");
        resultActions.andDo(print())
                .andExpect(status().isOk());